package sjtu.ist.warehouse4ws.model;

import java.util.ArrayList;
import java.util.List;



/**
 * Epcunit entity. @author MyEclipse Persistence Tools
 */

public class Epcunit  implements java.io.Serializable {


    // Fields    

     private String modelId;
     private Integer id;
     private String type;
     private String name;
     private Integer participant=0;
     private String nextstring;
     private String epcId;
     private String companyId;
     private String groupId;
     private String versionId;
     private List<Integer> next=new ArrayList<Integer>();
     private String uid;
    // Constructors

    /** default constructor */
    public Epcunit() {
    }


   
    public Epcunit(String modelId, Integer id, String type, String name,
			Integer participant, String nextstring, String epcId,
			String companyId, List<Integer> next,String uid) {
		super();
		this.modelId = modelId;
		this.id = id;
		this.type = type;
		this.name = name;
		this.participant = participant;
		this.nextstring = nextstring;
		this.epcId = epcId;
		this.companyId = companyId;
		this.next = next;
		this.uid=uid;
		
	}



	// Property accessors

    public String getModelId() {
        return this.modelId;
    }
    
    public void setModelId(String modelId) {
        this.modelId = modelId;
    }

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }

    public String getType() {
        return this.type;
    }
    
    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }

    public Integer getParticipant() {
        return this.participant;
    }
    
    public void setParticipant(Integer participant) {
        this.participant = participant;
    }

    public String getNextstring() {
        return this.nextstring;
    }
    
    public void setNextstring(String nextstring) {
        this.nextstring = nextstring;
    }

    public String getEpcId() {
        return this.epcId;
    }
    
    public void setEpcId(String epcId) {
        this.epcId = epcId;
    }
   
    
    public List<Integer> getNext() {
		return next;
	}

	public void setNext(List<Integer> next) {
		this.next = next;
	}
	public void stringToArray(){
		int length=nextstring.length();
		int s=0,d=0;
		while (s<length){
			
			while (nextstring.charAt(d)!=','&&d<length){
				d++;
			}
			next.add(Integer.parseInt(nextstring.substring(s, d)));
			d++;
			s=d;
			
		}
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getCompanyId() {
		return companyId;
	}



	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}



	public String getGroupId() {
		return groupId;
	}



	public void setVersionId(String versionId) {
		this.versionId = versionId;
	}



	public String getVersionId() {
		return versionId;
	}



	public String getUid() {
		return uid;
	}



	public void setUid(String uid) {
		this.uid = uid;
	}

    






}